<template>
  <div class="home">
    <div class="container">
      <section class="hero">
        <h1 class="title">校园闲置书籍智能循环平台</h1>
        <p class="subtitle">让知识流动，让书籍再生</p>
        <div class="hero-actions">
          <router-link to="/books" class="btn btn-primary">浏览书籍</router-link>
          <router-link to="/publish" class="btn btn-secondary">发布书籍</router-link>
        </div>
      </section>

      <section class="features">
        <div class="feature-card">
          <div class="feature-icon">📚</div>
          <h3>书籍交易</h3>
          <p>快速找到你需要的二手书籍</p>
        </div>
        <div class="feature-card">
          <div class="feature-icon">🤖</div>
          <h3>AI智能</h3>
          <p>价格预测、瑕疵检测、笔记提取</p>
        </div>
        <div class="feature-card">
          <div class="feature-icon">👥</div>
          <h3>社交互动</h3>
          <p>读书小组、分享动态、交流心得</p>
        </div>
      </section>
    </div>
  </div>
</template>

<script setup lang="ts">
// 首页逻辑
</script>

<style scoped lang="scss">
.home {
  min-height: calc(100vh - 84px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  text-align: center;
  padding: 80px 0;
}

.title {
  font-size: 48px;
  font-weight: 700;
  color: #1890ff;
  margin-bottom: 16px;
}

.subtitle {
  font-size: 20px;
  color: #666;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn {
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-block;
}

.btn-primary {
  background: #1890ff;
  color: #fff;
  
  &:hover {
    background: #40a9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
  }
}

.btn-secondary {
  background: #fff;
  color: #1890ff;
  border: 1px solid #1890ff;
  
  &:hover {
    background: #e6f7ff;
    transform: translateY(-2px);
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  padding: 60px 0;
}

.feature-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  
  &:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}
</style>